package cn.itsource.hrm.feignclients;

import cn.itsource.hrm.fallback.FastdfsFeignClientFallbackFactory;
import cn.itsource.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "fastdfs-server",fallbackFactory = FastdfsFeignClientFallbackFactory.class)//写远程调用的服务名
public interface FastdfsFeignClient {
    //写上要调用的远程的方法，不要方法体
    @PostMapping("/fastdfs/download")
    public byte[] download(@RequestParam("path")String path);

    //上传文件byte[]方式
    @PostMapping("/fastdfs/uploadBytes")
    public AjaxResult uploadBytes(@RequestBody byte[] bytes, @RequestParam("extName") String extName);
}
